<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* ul里最后一个li标签 */
        ul li:last-child{
            background-color: bisque;
        }
        /* ul里第一个li标签 */
        ul li:first-child{
            background-color: rgb(69, 25, 57);
        }
    </style>
</head>
<body>
    <ul>
        <li>l1</li>
        <li>l2</li>
        <li>l3</li>
    </ul>
</body>
</html>